<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymelesf.org.com">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:text="${name}"></div>
<a th:href="@{http://blog.eg.com/}">绝对路径</a>
<a th:href="@{/}">相对路径</a>
<a th:href="@{css/bootstrap.min.css}">Content路径，默认访问static文件夹</a>
<br>
<span th:text="'欢迎您,'+ ${name}+'!'"></span>
<br>
<span th:text="2+3">2+3</span>
<span th:text="4%2">4%2</span>
<br>

<div th:if="${name} eq huixin">
    <span>欢迎您,管理员</span>
</div>

<div th:if="${name} eq yuxinhai">
    <span>欢迎您,vip</span>
</div>

<div th:if="${age} lt 18">
    <span>未成年</span>
</div>

<span th:if="${name}==null">为空</span>
<span th:if="${name}!=null">不为空</span>
<span th:if="${#strings.isEmpty(name)}">为空</span>
<span th:if="${name} eq huixin">相同</span>
<span th:if="${name} ne yuxinhai">不相同</span>
<span th:text="${name} ?:'默认值'"></span>
<span th:if="${#strings.contains(name,'xin')}">xin</span>
</body>
</html>